1. Field of the Invention The present invention relates to an improved data processing system and, in particular, to a method and apparatus for database operations.
2. Description of Related Art
Lightweight Directory Access Protocol (LDAP) servers typically include in their distribution a utility program that reads directory entries that are specified in the LDAP Data Interchange Format (LDIF) and loads them into the server's directory. This utility program typically reads entries from an LDIF file sequentially and then adds them to the directory by passing them to the directory server via a network connection, after which the utility program waits for the completion of the current add operation before initiating the next add operation. Because adding an entry to a directory may involve significant amounts of data input/output, some directory servers are capable of handling LDAP addition operations from multiple client connections concurrently. More information about LDAP can be found in Wahl et al., “Lightweight Directory Access Protocol (v3)”, RFC 2251, Internet Engineering Task Force (IETF), July 1997; more information about LDIF can be found in Good, “The LDAP Data Interchange Format (LDIF)—Technical Specification”, RFC 2849, IETF, June 2000.
Submitting multiple concurrent requests from a given client could enhance the performance of loading directory entries from LDIF data. However, the need to maintain data consistency presents a significant problem. Due to the nature of the LDAP data structure, it is common for there to be dependencies among the entries expressed in the LDIF file; loading a particular entry may not make sense before a set of other entries has been successfully loaded. Perhaps due to data consistency issues, some LDAP servers serialize updates at the server and do not allow for concurrent processing of update operations; these servers are distributed with a single-threaded client utility program for adding LDIF data to a directory but are not provided with a multi-threaded utility program.
One possible solution to the consistency issue is to expand the granularity of the add operation such that adding an entire LDIF file comprises a single transaction. Since the entries are all committed at once, there is no intermediate inconsistent state in the case that elements are added out of order. However, in this transactional approach, failure in the loading of one entry causes loading of all entries in the LDIF file to be rolled back.
Therefore, it would be advantageous to have a method for loading an LDIF file to an LDAP directory in a multi-threaded fashion while preserving data consistency. It would be particularly advantageous to provide a process that commits each element from the LDIF file individually, thereby allowing processing to proceed around any element that causes an error.